                <div id="content" class="span10">
                    <!-- content starts -->
                    <div class="row-fluid sortable">
                        <div class="box span12">
                            <div class="box-content">
                                <?php if(!empty($detail)){
                                    foreach ($detail as $row){
                                    ?>
                                <form class="form-horizontal" action="<?php echo base_url();?>peng/update" method="post">
                                  <fieldset>
                                    <legend>Ubah Detail Pengiriman</legend>
                                    <div class="row-fluid">
                                        <div class="span6">
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nomor Pengiriman</label>
                                                <div class="controls">
                                                    <input type="hidden" class="span6 typeahead" id="typeahead" name="id_pengiriman" id="no_aktiva" value="<?=$row['id_pengiriman']?>">
                                                    <input type="text" class="span8 typeahead" name="no_pengiriman" id="id_pengiriman" value="<?=$row['no_pengiriman']?>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nomer Pesanan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="nomer_pesanan" id="nama" value="<?=$row['nomer_pesanan']?>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nama</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="nama" id="keterangan" value="<?=$row['nama']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Alamat</label>
                                                <div class="controls">
                                                    <textarea class="span8 typeahead" name="alamat" id="alamat" value="<?=$row['alamat']?>" ><?=$row['alamat']?> </textarea>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="span6">
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Karyawan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="karyawan" id="nilai_residu" value="<?=$row['karyawan']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Jenis Barang</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="kode_barang" id="umur_ekonomis" value="<?=$row['jenis_barang']?>">
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Kuantitas</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="jumlah" id="cabang" value="<?=$row['kuantitas']?>">
                                                </div>
                                            </div>
                                        </div>
                                        
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                        <a type="reset" class="btn" href="<?php echo base_url() ?>peng">Cancel</a>
                                    </div>
                                    </fieldset>
                                </form>
								
                                <?php }}else {?>
                                
								<form class="form-horizontal" action="<?php echo base_url();?>peng/insert" method="post">
                                  <fieldset>
                                    <legend>Tambah Pengiriman Baru</legend>
                                    <?php if(empty($error)){}else{?>
                                    <div class="alert alert-warning alert-dismissible" role="alert">
                                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only"></span></button>
                                        <strong>Peringatan!</strong> Aktiva sudah pernah diinputkan
                                    </div>
                                    <?php } ?>
                                    <div class="row-fluid">
                                        <div class="span6">
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nomor Pengiriman</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="no_pengiriman" value="<? echo $nomer_pengiriman; ?>" readonly="true" id="no_aktiva" >
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nomer Pesanan</label>
                                                <div class="controls">
											   <select id="no_pesanan" name="nomer_pesanan" data-rel="chosen">
                                                       
                                                        <optgroup label="Pesanan">
                                                        <?php foreach ($pesanan as $kat){
														
                                                            echo '<option value="'.$kat['nomer_pesanan'].'">'.$kat['nomer_pesanan'].'</option>';
                                                        }?>
                                                        </optgroup>
                                                    </select>
													
													
													
													</div>
                                            </div>
											
											 <div class="control-group">
                                                <label class="control-label" for="typeahead">Nomer Karyawan</label>
                                                <div class="controls">
											  	
													 <select id="karyawan" name="karyawan" data-rel="chosen">
                                                       
                                                        <optgroup label="Pesanan">
                                                        <?php foreach ($karyawan as $kat){
														
                                                            echo '<option value="'.$kat['id_karyawan'].'">'.$kat['id_karyawan'].' | '.$kat['nama'].'</option>';
                                                        }?>
                                                        </optgroup>
                                                    </select>
													
													</div>
                                            </div>
											
												<div class="control-group">
                                                <label class="control-label" for="typeahead">Jumlah</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="jumlah" id="cabang" >
                                                </div>
                                            </div>
											<!--
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Nama</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="nama" id="keterangan" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Alamat</label>
                                                <div class="controls">
                                                    <textarea class="span8 typeahead" name="alamat" id="alamat"  ></textarea>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="span6">
                                            <div class="control-group">
                                                <label class="control-label" for="typeahead">Karyawan</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="karyawan" id="nilai_residu" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Kode Barang</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="kode_barang" id="umur_ekonomis" >
                                                </div>
                                            </div>
											<div class="control-group">
                                                <label class="control-label" for="typeahead">Jumlah</label>
                                                <div class="controls">
                                                    <input type="text" class="span8 typeahead" name="jumlah" id="cabang" >
                                                </div>
                                            </div>
                                            
                                        </div>
										-->
										</div>
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                        <button type="reset" class="btn">Cancel</button>
                                    </div>
                                    </fieldset>
                                </form>
								
                                <?php } ?>
                            </div>
                        </div>
                        <!--/span-->
                    </div>
					
                    <?php
                    if (empty($pengiriman)){
                        echo "tidak ada data";
                    } 
                    else {
                    
                    ?>
                    <div class="row-fluid sortable">
                        <div class="box span12">
                            <div class="box-content">
                                <table class="table table-striped table-bordered bootstrap-datatable datatable">
                                    <thead>
                                        <tr>
                                            <th>Nomor Pengirman</th>
                                            <th>Nomer Pesanan</th>
											 <th>Nama</th>
                                            <th>Tanggal pengiriman</th>
                                            <th>Alamat</th>
                                            <th>Karyawan</th>
                                            <th>Jenis barang</th>
											<th>Kuantitas</th>
											<th>Status</th>
                                        </tr>
                                    </thead>
                                    
                                    <tbody>
                                        <?php
                                    foreach ($pengiriman as $row) {
                                    ?>
                                        <tr>
										
                                            <td><?=$row['no_pengiriman']?></td>
                                            <td><?=$row['nomer_pesanan']?></td>
                                            <td><?=$row['nama_konsumen']?></td>
											<td><?=$row['tanggal']?></td>
                                            <td><?=$row['alamat_konsumen']?></td>
                                            <td><?=$row['nama_karyawan']?></td>
											<td><?=$row['nama_barang']?></td>
											<td><?=$row['kuantitas']?></td>
											<td><?if($row['status_pengiriman']==0){echo "proses ";}else{ echo 'Terkirim';}?></td>
											
                                            <td class="center">
                                                <a class="btn btn-info" href="<?php echo base_url()?>peng/edit/<?=$row['no_pengiriman']?>">
                                                    <i class="icon-edit icon-white"></i>  
                                                    Edit                                            
                                                </a>
                                                <a class="btn btn-danger" href="<?php echo base_url()?>peng/delete/<?=$row['no_pengiriman']?>">
                                                    <i class="icon-trash icon-white"></i> 
                                                    Delete
                                                </a>
                                            </td>
                                        </tr>
                                        <?php
                                        } 
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <!--/span-->
                    </div>
                    <?php 
                }
                    ?>
                    <!--/row-->
                    <!-- content ends -->
                </div>
                <!--/#content.span10-->